<div class="wrapper wrapper-content">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox">

                <div class="ibox-title">
                    <h5>{$page_title}</h5>
                    <div class="ibox-tools"><a href="javascript:void(0);" class="btn btn-xs btn-default btn-help-detail"  data-type="cst_clue"> <i class="fa fa-question-circle"> {:lang('help')}</i></a>
                    </div>
                </div>
                <div class="ibox-content">
                    <div class="row">
                        <form id="pagerForm" method="post" class="form-inline searchForm">
                            <div class="col-sm-12">
                                <div class="input-group">
                                    <input type="text" name="keywords" placeholder="{:lang('enter keyword search')}" class="form-control">
                                </div>
                                <div class="input-group">
                                  <span class="input-group-btn">
                                  <button type="button" class="btn btn-primary ajaxSearchForm"><i class="fa fa-search"></i> {:lang('搜索')}</button>
                                  </span>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
            <div class="ibox float-e-margins">
                <div class="ibox-content">
                    <div class="row">
                        <div class="col-sm-6 m-b-xs">
                            <lqf_link>
                                <a class="btn btn-info ajax-open"  data-url="{:url('TenTenant/add')}" ><i class="fa fa-plus"></i> {:lang('添加')}</a>
                            </lqf_link>
                        </div>
                    </div>
                </div>
                <div class="ibox-content table-responsive">
                    <table class="table table-hover sorttable ajax-list-table" data-url="{:url('TenTenant/show_json')}" width="100%">
                        <thead>
                        <tr>
                            <th width="22"><input type="checkbox" group="ids" class="checkboxCtrl"></th>
                            <th width="60">{:lang('ID')}</th>
                            <th width="100">{:lang('企业名称')}</th>
                            <th width="80">{:lang('类型')}</th>
                            <th width="80">{:lang('联系人')}</th>
                            <th width="80">{:lang('手机')}</th>
                            <th width="100">{:lang('开始时间')}</th>
                            <th width="100">{:lang('到期时间')}</th>
                            <th width="80">{:lang('用户数')}</th>
                            <th width="80">{:lang('管理员')}</th>
                            <th width="100" class="text-center">{:lang('创建时间')}</th>
                            <th width="60" class="text-center">{:lang('启用')}</th>
                            <th width="80" class="text-center">{:lang('操作')}</th>
                        </tr>
                        </thead>
                        <tbody>
                        </tbody>
                        <tfoot class="ibox-content">
                        <tr>
                            <td colspan="9" align="center"></td>
                        </tr>
                        </tfoot>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
<script id="tableListTpl" type="text/html">
    <% for(var i=0;i<data.length;i++) {
    var visible='';if(data[i]['visible']=='1') visible='checked';
    %>
    <tr>
        <td><input name="user_id" class="checkboxCtrlId" value="<%=data[i]['id']%>" type="checkbox"></td>
        <td><%=data[i]['id']%></td>
        <td>
            <a class="ajax-open" data-url="{:url('TenTenant/detail')}"  data-ids="{'id':'<%=data[i]['id']%>'}" >
            <%=data[i]['company']%>
            </a>
        </td>
        <td><%=data[i]['tenant_type_name']%></td>
        <td><%=data[i]['linkman']%></td>
        <td><%=data[i]['mobile']%></td>
        <td><%=data[i]['start_date']%></td>
        <td><%=data[i]['stop_date']%></td>
        <td><%=data[i]['tenant_max_user']%></td>
        <td>
            <a class="ajax-open" data-url="{:url('TenUser/detail')}"
               data-ids="{'id':'<%=data[i]['init_admin_id']%>'}">
            <%=data[i]['init_admin_name']%>
            </a>
        </td>
        <td class="text-center"><%=data[i]['create_time']%></td>
        <td class="text-center">
            <input name="visible" class="ajax-checkbox" type="checkbox"
                   data-url="{:url('TenTenant/set_visible',array('name'=>'visible'))}"  data-id="<%=data[i]['id']%>" <%=visible%> >
        </td>
        <td class="text-center">
            <lqf_link><a class="ajax-open" data-url="{:url('TenTenant/edit')}"  data-ids="{'id':'<%=data[i]['id']%>'}" >{:lang('修改')}</a></lqf_link>
            <lqf_link><a class="ajax-del confirm" data-url="{:url('TenTenant/del')}" data-ids="{'id':'<%=data[i]['id']%>'}">{:lang('删除')}</a></lqf_link>
        </td>
    </tr>
    <% } %>
</script>
<script type="text/javascript">
    $(document).ready(function () {
        turnPage(1);
    });
</script>